home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Complete Internet Archive
/
Complete Internet Archive.iso
/
VRML
/
cp2b2x.exe
/
DATA.Z
/
manual.tcl
< prev
next >
Wrap
Text File
|
1996-06-26
|
730b
|
31 lines
# This is a sample script for event handler.
set bRotating 0
set timeoutHandler 0
proc myPeriodicRotate { obj event userData } {
global vsCSLocal
global vsRelative
global vsContinue
global bRotating
vsRotateAngle $obj 0.0 10.0 10.0 $vsCSLocal $vsRelative
return $vsContinue
}
proc myClickRotate { obj event userData } {
global bRotating
global timeoutHandler
global vsTclScript
global vsPeriodicTask
if {$bRotating == 0} {
set bRotating 1
set timeoutHandler [vsAddTimeOutHandler $obj 250 $vsTclScript "" myPeriodicRotate 0 $vsPeriodicTask]
} elseif {$bRotating == 1} {
set bRotating 0
vsRemoveTimeOutHandler $obj $timeoutHandler
}
}